package com.korovyansk.mapsproto.beans;

public class Size{
	
	public final int width;
	public final int height;
	
	public Size(int width, int height) {
		this.width = width;
		this.height = height;
	}
	
	@Override
	public boolean equals(Object o) {
		if(o != null && o instanceof Size){
			Size otherSize = (Size)o;
			return width == otherSize.width && height == otherSize.height;
		}
		return false;
	}

	
	@Override
	public int hashCode() {
		return width * 3 + height * 5;
	}

	@Override
	public String toString() {
		return width + "x" + height;
	}
}